import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
Vue.config.productionTip = false
import Index from './pages/Index.vue'
import Type from './pages/Type.vue'
import Order from './pages/Order.vue'
import My from './pages/My.vue'

import HomePage from './pages/homePage.vue'
import Sport from './pages/Sport.vue'
import News from './pages/News.vue'

import HomeSport from '@/pages/Second/HomeSport.vue'
import ForeignSport from '@/pages/Second/ForeignSport.vue'
import SportMain from '@/pages/Second/SportMain.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect:'/homePage'
  },
  {
    path: '/index',
    component:Index
  },
  {
    path: '/type',
    component:Type
  },
  {
    path: '/order',
    component:Order
  },
  {
    path: '/my',
    component:My
  },
  {
    path: '/homePage',
    component:HomePage
  },
  {
    path: '/sport',
    component: Sport,
    children: [
      {
        path: 'homesport',
        component:HomeSport
      },
      {
        path: 'foreignsport',
        component:ForeignSport
      },
      {
        path: 'sportmain',
        component:SportMain
      }
    ]
  },
  {
    path: '/news',
    component:News
  },
]
const router = new VueRouter({
  routes
})
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
